<template>
  <div>
    <home/>
    <div class="baseHeight">
      <div class="login-container">
        <h2>通用下载</h2>
        <form>
          <div class="form-group">
            <label >文件名:</label>
            <input type="text" :value="fileFile">
          </div>
          <button class="btn-login" type="submit" @click="fnDown">下载</button>
        </form>
      </div>
    </div>
  </div>

</template>

<script>
import Home from "@/views/base/common/home";

export default {
  name: "Qecode",
  components: {
    Home
  },
  data() {
    return {
      fileFile:'',
      reqUrl:'http://10.114.161.39:18082/fileFlare/'
    }
  },
  methods: {
    fnDown(){
      window.open(this.reqUrl + this.fileFile);
    }
  }
}
</script>

<style scoped>
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.login-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 300px;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.btn-login {
  display: block;
  width: 100%;
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
}

.btn-login:hover {
  background-color: #45a049;
}

.error-message {
  color: red;
  text-align: center;
  margin-top: 10px;
}
</style>
